package com.suncky.example.bean

import com.suncky.frame.utils.CollectionUtils

data class Person(
    val name:String,
    val age:Int,
    val gender:String,
    val tel:String,
    val family:List<String>?,
    val students:List<Person>?,
    val friends:String,
    val numbers:List<Long>?,
){
    fun getFamilyMembers():String {
        return CollectionUtils.joinToString(family,", ")
    }

    fun getStudentsName():String{
        return CollectionUtils.joinToString(students,", ") { o -> o?.name }
    }

    fun getNumbersStr():String {
        return CollectionUtils.joinToString(numbers,", "
        ) { o -> o?.toString() }
    }
}
